package com.gitee.target123.develop.login.properties;

import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.config.AuthSource;
import me.zhyd.oauth.request.AuthRequest;

import java.util.HashMap;
import java.util.Map;

public class ExtendProperties {

    /**
     * 枚举类全路径
     */
    private Class<? extends AuthSource> enumClass;

    private Map<String, ExtendRequestConfig> config = new HashMap<>();

    public Class<? extends AuthSource> getEnumClass() {
        return enumClass;
    }

    public void setEnumClass(Class<? extends AuthSource> enumClass) {
        this.enumClass = enumClass;
    }

    public Map<String, ExtendRequestConfig> getConfig() {
        return config;
    }

    public void setConfig(Map<String, ExtendRequestConfig> config) {
        this.config = config;
    }

    public static class ExtendRequestConfig extends AuthConfig {
        /**
         * 请求对应全路径
         */
        private Class<? extends AuthRequest> requestClass;

        public Class<? extends AuthRequest> getRequestClass() {
            return requestClass;
        }

        public void setRequestClass(Class<? extends AuthRequest> requestClass) {
            this.requestClass = requestClass;
        }
    }
}
